<section class="Hui-container">
	<div class="Hui-wraper">	
		<div id="a-parents">		
			<h2>家庭状况</h2>
			<h5>*是必填信息</h5>
			<div class="line"></div>	
			<br>		
			<form method="post" action="{:U('Aparents/save')}" id="parents_form" class="form form-horizontal responsive">	
				<div class="row cl">		
					<label class="form-label col-xs-2">*婚姻状况：</label>
					<div class="formControls col-xs-5"> 
						<span class="select-box">
							<select class="select" size="1" id ="marital" name="marital" datatype="*" nullmsg="请选择！">
								<option value="" selected>请选择你的婚姻状态</option>
								<option value="1">单身</option>
								<option value="2">已婚</option>
								<option value="3">分居</option>
								<option value="4">丧偶</option>
								<option value="5">离异</option>
							</select>
						</span> 
					</div>
					<div class="col-xs-5"> </div>
				</div>		
				<br>	
				<div class="row cl">
					<label class="form-label col-xs-2">*子女个数：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" maxlength="2" name="kid" id="kid" datatype="integer" nullmsg="请填写子女个数，没有子女请填写0">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<h3>父亲信息</h3>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">*姓名：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" maxlength="30" name="father" id="father" datatype="en-ch" nullmsg="请填写父亲姓名">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">*联系电话：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" maxlength="18" name="phone_f" id="phone_f" datatype="phone" nullmsg="请填写父亲联系电话">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">*职业：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" maxlength="50" name="occupation_f" id="occupation_f" datatype="en-ch" nullmsg="请填写父亲职业">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">*雇主：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" maxlength="50" name="employer_f" id="employer_f" datatype="en-ch" nullmsg="请填写父亲雇主">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">*年收入：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" maxlength="7" placeholder="人民币" name="income_f" id="income_f" datatype="integer" nullmsg="请填写父亲年收入">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<h3>母亲信息</h3>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">*姓名：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" maxlength="30" name="mother" id="mother" datatype="en-ch" nullmsg="请填写父亲姓名">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">*联系电话：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" maxlength="18" name="phone_m" id="phone_m" datatype="phone" nullmsg="请填写母亲联系电话">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">*职业：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" maxlength="50" name="occupation_m" id="occupation_m" datatype="en-ch" nullmsg="请填写母亲职业">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">*雇主：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" maxlength="50" name="employer_m" id="employer_m" datatype="en-ch" nullmsg="请填写母亲雇主">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">*年收入：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" maxlength="7" placeholder="人民币" name="income_m" id="income_m" datatype="integer" nullmsg="请填写母亲年收入">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<h3>配偶信息(已婚请填写)</h3>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">姓名：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" ignore="ignore" maxlength="30" name="spouse" id="spouse" datatype="en-ch">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">联系电话：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" maxlength="18" ignore="ignore" name="phone_s" id="phone_s" datatype="phone">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">职业：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" ignore="ignore" maxlength="50" name="occupation_s" id="occupation_s" datatype="en-ch">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">雇主：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" ignore="ignore" maxlength="50" name="employer_s" id="employer_s" datatype="en-ch">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<div class="row cl">
					<label class="form-label col-xs-2">年收入：</label>
					<div class="formControls col-xs-5">
						<input type="text" class="input-text" ignore="ignore" maxlength="7" placeholder="人民币" name="income_s" id="income_s" datatype="integer">
					</div>
					<div class="col-xs-5"> </div>
				</div>
				<br>
				<div class="row cl">
					<div class="col-xs-10 col-xs-offset-2">
						<a href="{:U('Afinancials/index')}" class="btn btn-warning radius previous_form">上一步</a>
						<input class="btn btn-primary" type="submit" value="&nbsp;&nbsp;保存&下一步&nbsp;&nbsp;">
					</div>
				</div>
			</form>				
		</div>
	</div>
</section>

<script>
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	$("#parents_form").Validform({
		tiptype:2
	});
	
	for(var i=0;i<document.getElementById('marital').options.length;i++) {  
        if(document.getElementById('marital').options[i].value =="{$data.marital}") {  
        	document.getElementById('marital').options[i].selected = true;  
            break;  
        }  
    } 
	document.getElementById('kid').value="{$data.kid}";
	document.getElementById('mother').value="{$data.mother}";
	document.getElementById('father').value="{$data.father}";
	document.getElementById('spouse').value="{$data.spouse}";
	document.getElementById('income_m').value="{$data.income_m}";
	document.getElementById('employer_m').value="{$data.employer_m}";
	document.getElementById('occupation_m').value="{$data.occupation_m}";
	document.getElementById('income_f').value="{$data.income_f}";
	document.getElementById('employer_f').value="{$data.employer_f}";
	document.getElementById('occupation_f').value="{$data.occupation_f}";
	document.getElementById('phone_f').value="{$data.phone_f}";
	if("{$data.income_s}">0)
		document.getElementById('income_s').value="{$data.income_s}";
	document.getElementById('employer_s').value="{$data.employer_s}";
	document.getElementById('occupation_s').value="{$data.occupation_s}";
	document.getElementById('phone_s').value="{$data.phone_s}";
	document.getElementById('phone_m').value="{$data.phone_m}";	
	
	
});
</script>	
		